/***************************************************************************
 *   Copyright (C) 2011  by TinySofts                                       *
 *   tinysofts@gmail.com                                                   *
 *   All Rights Reserved.                                                  *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 ***************************************************************************/

/*Base Class For All Dictionary Used in TinyDict*/
#ifndef BASEDICT_H
#define BASEDICT_H

#include <QtCore>

#define DICTTYPE_STARDICT 0
#define DICTTYPE_BABYLONDICT 1
#define DICTTYPE_EXTRACTEDBABYLON 2

class BaseDict
{
public:
    BaseDict() {}
    virtual ~BaseDict() {}
    virtual bool setPath(QString path, QString file)=0;
    virtual bool init() =0;
    virtual bool reset() =0;
    /*Lookup word for Exact match*/
    virtual QByteArray lookUpDict(const QString & word)=0;
    /*Lookup word for `best` match*/
    virtual QByteArray lookUpDict2(const QString & word)=0;

protected:
        int _type;
        QString _path;
        QString _file;
};

#endif // BASEDICT_H
